/**
 *  这个文件专门用于定义生成 count组件的action对象的方法
 */
import {INCREMENT,DECREMENT} from '../constant'

 export const createIncrementAction = data => ({type:INCREMENT,data});
 export const createDecrementAction = data => ({type:DECREMENT,data});
 // 异步action
 export const createAsyncIncrementAction = (data,time) => {
     return (dispatch)=>{
         setTimeout(()=>{
            dispatch(createIncrementAction(data));
         },time)
     }
 }
